
(print 
 (1+ 
  (loop for cicle = 0 then (mod (1+ cicle) 4)
	for offset = 2 then (if (zerop cicle) (+ 2 offset) offset)
	for i = 3 then (+ i offset)
	while (<= offset 1001)
	;do (format t "~d ~d ~%" i offset))
	sum i)))


;43 44 45 46 47 48 49 50
;42 21 22 23 24 25 26 51
;41 20  7  8  9 10 27 52
;40 19  6  1  2 11 28 53
;39 18  5  4  3 12 29 54
;38 17 16 15 14 13 30 55
;37 36 35 34 33 32 31 56

; of 2 2 2 2  4  4  4  4  6  6  6  6  8  8  8  8 ... 10001
;val 3 5 7 9 13 17 21 25 31 37 43 49 57 65 73 81 ...